package com.bxshey.happyTown.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bxshey.happyTown.entity.CardRolls;
import com.bxshey.happyTown.vo.cardRolls.CardRollsVO;
import com.bxshey.happyTown.vo.cardRolls.RecordingVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @作者：不想说话而已
 * @Date：2024/1/4 12:14
 */
@Mapper
public interface CardRollsMapper extends BaseMapper<CardRolls> {
    //根据卡卷号码查询卡卷信息
    CardRolls queryCardNumber(String cardNumber);

    //新增卡卷信息
    Integer insertOne(CardRolls cardRolls);

    //修改卡卷信息
    Integer update(CardRolls cardRolls);

    //根据uid获取所有的卡卷信息
    List<CardRollsVO> queryAll(@Param("uid") Integer uid, @Param("statue") Integer statue);

    //获取所有卡卷记录
    List<RecordingVO> recording(Integer uid);

    //根据id获取卡卷信息
    CardRollsVO queryById(Integer id);
    //使用卡卷
    Integer choose(@Param("uid") Integer uid,@Param("id") Integer id,@Param("statue") Integer statue);
}
